.class Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;
.super Ljava/lang/Object;
.source "RexseeFileSelector.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/fileSelector/RexseeFileSelector$FileSelector;-><init>(Lrexsee/fileSelector/RexseeFileSelector;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Landroid/widget/AdapterView$OnItemClickListener;"
    }
.end annotation


# instance fields
.field final synthetic this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;


# direct methods
.method constructor <init>(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    .line 225
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 4
    .param p2, "view"    # Landroid/view/View;
    .param p3, "position"    # I
    .param p4, "id"    # J
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 228
    .local p1, "parent":Landroid/widget/AdapterView;, "Landroid/widget/AdapterView<*>;"
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    iget-object v2, v2, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->adapter:Lrexsee/fileSelector/FileAdapter;

    iget-object v2, v2, Lrexsee/fileSelector/FileAdapter;->fileList:Ljava/util/ArrayList;

    invoke-virtual {v2, p3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/io/File;

    .line 229
    .local v0, "file":Ljava/io/File;
    if-nez v0, :cond_0

    .line 248
    :goto_0
    return-void

    .line 230
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "file://"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 231
    .local v1, "path":Ljava/lang/String;
    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 232
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    invoke-virtual {v2, v1}, Lrexsee/fileSelector/RexseeFileSelector;->load(Ljava/lang/String;)V

    goto :goto_0

    .line 234
    :cond_1
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    iget-boolean v2, v2, Lrexsee/fileSelector/RexseeFileSelector;->mMultiple:Z

    if-nez v2, :cond_2

    .line 235
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    iget-object v2, v2, Lrexsee/fileSelector/RexseeFileSelector;->mSelection:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->clear()V

    .line 236
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    iget-object v2, v2, Lrexsee/fileSelector/RexseeFileSelector;->mSelection:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 237
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$0(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/core/browser/Browser;

    move-result-object v2

    iget-object v2, v2, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v3, "onFileSelected"

    invoke-virtual {v2, v3}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    .line 238
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    invoke-virtual {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->dismiss()V

    goto :goto_0

    .line 240
    :cond_2
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    iget-object v2, v2, Lrexsee/fileSelector/RexseeFileSelector;->mSelection:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_3

    .line 241
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    iget-object v2, v2, Lrexsee/fileSelector/RexseeFileSelector;->mSelection:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 245
    :goto_1
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    invoke-virtual {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->reload()V

    goto :goto_0

    .line 243
    :cond_3
    iget-object v2, p0, Lrexsee/fileSelector/RexseeFileSelector$FileSelector$1;->this$1:Lrexsee/fileSelector/RexseeFileSelector$FileSelector;

    # getter for: Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->this$0:Lrexsee/fileSelector/RexseeFileSelector;
    invoke-static {v2}, Lrexsee/fileSelector/RexseeFileSelector$FileSelector;->access$1(Lrexsee/fileSelector/RexseeFileSelector$FileSelector;)Lrexsee/fileSelector/RexseeFileSelector;

    move-result-object v2

    iget-object v2, v2, Lrexsee/fileSelector/RexseeFileSelector;->mSelection:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1
.end method
